package com.freewater.springboot.demo.aop.api.advices.after;

import org.springframework.lang.Nullable;

import java.lang.reflect.Method;
import java.util.Arrays;

public class SimpleAfterAdvice implements AfterFinalAdvice {

    @Override
    public void after(@Nullable Object returnValue, Method method, Object[] args, @Nullable Object target) {
        System.out.println("执行的方法名：" + method.getName());
        System.out.println("执行参数：" + Arrays.asList(args));
        System.out.println("执行的目标类：" + (target != null ? target.getClass().getName() : ""));
    }
}
